// 引入vue
import Vue from 'vue'

// 引入插件
import VueRouter from 'vue-router'

// 引入路由组件
import Login from '../pages/Login'
import Home from '../pages/Home'
import Music from '../pages/Home/Music'
import News from '../pages/Home/News'

// 
Vue.use(VueRouter)

export default new VueRouter({
    routes: [{
            path: '/login',
            component: Login
        },
        {
            path: '/home',
            component: Home,
            // 二级路由
            children:[
                {path:'music',component:Music ,name:'a'},
                {path:'news',component:News, name:'b'}
            ]
        }
    ]
})